<%--
  Created by IntelliJ IDEA.
  User: User
  Date: 2024/9/12
  Time: 10:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    welcome to main
    <c:choose>
        <c:when test="${empty user}">
            <a href="${pageContext.request.contextPath}/register.jsp">注册</a>
            <a href="${pageContext.request.contextPath}/login.jsp">登录</a>

        </c:when>
        <c:otherwise>
            欢迎您:${user.username}
            <a href="${pageContext.request.contextPath}/logout.user">注销</a>
        </c:otherwise>
    </c:choose>
</body>
</html>
